﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace IceDog.WebApi.AnythingApi.Controllers
{
    /// <summary>
    /// Http方法
    /// </summary>
    [Route("[controller]")]
    [ApiController]
    public class HttpMethodController : ControllerBase
    {
        /// <summary>
        /// Get请求
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ProducesResponseType(StatusCodes.Status200OK)]
        public ActionResult Get()
        {
            return Ok();
        }
        /// <summary>
        /// Post请求
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [ProducesResponseType(StatusCodes.Status200OK)]
        [ProducesResponseType(StatusCodes.Status201Created)]
        public ActionResult Post()
        {
            return Ok();
        }
        /// <summary>
        /// Delete请求
        /// </summary>
        /// <returns></returns>
        [HttpDelete]
        [ProducesResponseType(StatusCodes.Status200OK)]
        public ActionResult Delete()
        {
            return Ok();
        }
        /// <summary>
        /// Head请求
        /// </summary>
        /// <returns></returns>
        [HttpHead]
        [ProducesResponseType(StatusCodes.Status200OK)]
        public ActionResult Head()
        {
            return Ok();
        }
        /// <summary>
        /// Put请求
        /// </summary>
        /// <returns></returns>
        [HttpPut]
        [ProducesResponseType(StatusCodes.Status200OK)]
        public ActionResult Put()
        {
            return Ok();
        }
        /// <summary>
        /// Patch请求
        /// </summary>
        /// <returns></returns>
        [HttpPatch]
        [ProducesResponseType(StatusCodes.Status200OK)]
        public ActionResult Patch()
        {
            return Ok();
        }
        /// <summary>
        /// Options请求
        /// </summary>
        /// <returns></returns>
        [HttpOptions]
        [ProducesResponseType(StatusCodes.Status200OK)]
        public ActionResult Options()
        {
            return Ok();
        }
    }
}